<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript" src="<?php echo $this->webroot;?>/misc/js/jquery-1.5.min.js"></script>
<script>
    $(document).ready(function(){
        $("#update").click(function(){
            var textfield   = $("#textfield").val();
            var textfield2   = $("#textfield2").val();
            $.ajax({
               url : '<?php echo url_for('user/ajax_edit');?>',
               data:{'title':textfield,'url':textfield2,'id':'<?php echo $rs->getId();?>'},
               type: "POST",
               success:function(re) {
                   alert('更新成功');
                   self.parent.tb_remove();
               }
            });
        });
    });
</script>
</head>
<style>
.l{float:left;}
.r{float:right;}
.c{clear:both;}
.img{border:none;}

.edit{
	margin:0 auto;
	width:460px;
	border:1px solid #bbcbcb;
	}

h3{
	margin:0px;
	padding:10px;
	font-size:18px;
	color:#666;
	font-weight:normal;
	background-color:#f1f7f8;
	}
.signmes{
	margin:20px auto;
	font-size:12px;
	color:#666;
	}
.signtext{
	width:320px;
	height:22px;
	line-height:22px;
	border:1px solid #bebebe;
	color:#666;
	}
.signarea{
	width:320px;
	height:100px;
	border:1px solid #bebebe;
	color:#666;
	}
.signin td, .edit td{
	height:35px;
	font-size:14px;
	}
.edit a img{
	border:none;
	}
</style>

<body>
<div id="bg" class="bg"></div>
		<div class="edit" id="popDiv">
                <h3>
                	<span class="l">编辑短网址信息</span>
                    <span class="r"></span>
                    <div class="c"></div>
                </h3>
                <div class="signmes">
            	<table width="400" border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr>
                    <td align="right">标题：</td>
                    <td colspan="2"><label>
                      <input name="textfield" type="text" class="signtext" id="textfield" value="<?php echo $rs->getTitle();?>"/>
                    </label></td>
                  </tr>
                  <tr>
                    <td align="right">网址：</td>
                    <td colspan="2"><input name="textfield2" type="text" class="signtext" id="textfield2" value="<?php echo $rs->getUrl();?>"/></td>
                  </tr>
                  <!--tr>
                  <tr>
                    <td align="right">关键词：</td>
                    <td colspan="2"><input name="textfield2" type="password" class="signtext" id="textfield2" /></td>
                  </tr>
                  <tr>
                  <tr>
                    <td align="right">描述：</td>
                    <td colspan="2"><textarea name="" cols="" rows="" class="signarea"></textarea></td>
                  </tr-->
                  <tr>
                    <td>&nbsp;</td>
                    <td class="btn_in" id="update"><BR /><a href="#"><img src="<?php echo $this->webroot.'/theme/default/';?>/u22/images/submit.png"/></a></td>
                  </tr>
                </table>
          </div>
        </div>
</body>
</html>
